Skip to content

Fix Nullable configuration in Mocha examples#9571

Merged
glen-84 merged 1 commit intomainfrom
gai/fix-nullable-configuration
Apr 17, 2026
Merged

Fix Nullable configuration in Mocha examples#9571
glen-84 merged 1 commit intomainfrom
gai/fix-nullable-configuration

Conversation

@glen-84
Copy link
Copy Markdown
Member

@glen-84 glen-84 commented Apr 17, 2026

Summary of the changes (Less than 80 chars)

  • Fix Nullable configuration in Mocha examples.

Copilot AI review requested due to automatic review settings April 17, 2026 10:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes nullable reference type configuration across the Mocha example projects by centralizing <Nullable> (and in one case <ImplicitUsings>) settings so the examples build consistently.

Changes:

  • Move example-level Nullable/ImplicitUsings configuration into Directory.Build.props where appropriate.
  • Remove redundant per-project Nullable/ImplicitUsings settings from example .csproj files.
  • Minor simplification in the Demo billing handler using a null-conditional update.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Mocha/examples/PostgresTransport/PostgresTransport.ServiceDefaults/PostgresTransport.ServiceDefaults.csproj Removes per-project nullable/implicit usings config so it’s inherited from the example’s props.
src/Mocha/examples/PostgresTransport/PostgresTransport.AppHost/PostgresTransport.AppHost.csproj Removes per-project nullable config so it’s inherited from the example’s props.
src/Mocha/examples/PostgresTransport/Directory.Build.props Enables Nullable and ImplicitUsings for the PostgresTransport example subtree.
src/Mocha/examples/ExceptionPolicies/ExceptionPolicies.csproj Enables Nullable directly in the example project.
src/Mocha/examples/Demo/Directory.Build.props Enables Nullable for the Demo example subtree.
src/Mocha/examples/Demo/Demo.ServiceDefaults/Demo.ServiceDefaults.csproj Removes per-project nullable/implicit usings config so it’s inherited from the Demo props.
src/Mocha/examples/Demo/Demo.AppHost/Demo.AppHost.csproj Removes per-project nullable config so it’s inherited from the Demo props.
src/Mocha/examples/Demo/Demo.Billing/Handlers/ProcessPartialRefundCommandHandler.cs Replaces an explicit null-check block with a null-conditional assignment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@glen-84 glen-84 merged commit 363a71f into main Apr 17, 2026
137 checks passed
@glen-84 glen-84 deleted the gai/fix-nullable-configuration branch April 17, 2026 10:18
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (a38513a) to head (42f3f44).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #9571   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants